<?php

namespace Yz\modules\Generic;
use Yz_Hash;
class Template_ItemMenu
    extends \Yz_Template_Native
{

    /**
     *
     */
    protected function doRender()
    {
        debug();
        $this->createMenu();
        return parent::doRender();
    }


    /**
     *
     */
    protected function createMenu()
    {
        debug();
        $baseURI = $this->value['YzModuleHref'];
        $menu = array();

        $id = $item->id;
        $menu[] = new Yz_Hash(array(
            'href' => $baseURI . "entry/{$id}",
            'title' => $this->translate(':Entry'),
            ));
        $menu[] = new Yz_Hash(array(
            'href' => $baseURI . "edit/{$id}",
            'title' => $this->translate(':Edit'),
            ));
        $this->value['menu'] = $menu;
        return $this;
    }

}
